<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			let serverurl = ''
			try {
				const value = uni.getStorageSync('serverurl')
				if (value) {
					serverurl = value
				}
			} catch (e) {
				uni.showToast({
					title: e.message,
					duration: 2000,
					icon:"error"
				})
			}
			let platform = uni.getSystemInfoSync().platform
			if((serverurl === undefined || serverurl === null || serverurl === "")&& platform !== 'ios' && platform !== 'android'){
				serverurl = window.location.href.split('/dk/')[0]
				uni.setStorageSync('serverurl', serverurl)
			}
			this.WebSocketTool.connectSocket(this)
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	
	/*每个页面公共css */
	/*阿里单色图标库 */
	@import '@/static/iconfont/iconfont.css';
</style>
